package com.jrx.anytxn.investor.dto.loan;

import com.jrx.anytxn.common.constant.RegexConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 保存联合贷资金源路由请求实体类
 *
 * @author liuyang
 * @date 2020-06-04
 */
@ApiModel(value = "SaveFundRouteReq对象", description = "保存联合贷资金源路由请求实体类")
public class SaveFundRouteReq implements Serializable {

    @ApiModelProperty(value = "租戶id",required = true)
    @Size(max=4, message = "租戶id不能超过4位")
    @NotEmpty(message = "租戶id不可空")
    private String tenantId;

    @ApiModelProperty(value = "用户id",required = true)
    @Size(max=20, message = "用户id不能超过20位")
    @NotEmpty(message = "用户id不可空")
    private String userId;

    @ApiModelProperty(value = "渠道",required = true)
    @Size(max=32, message = "渠道不能超过32位")
    @NotEmpty(message = "渠道不可空")
    private String channel;

    @ApiModelProperty(value = "产品id",required = true)
    @Size(max=32, message = "产品id不能超过32位")
    @NotEmpty(message = "产品id不可空")
    private String productId;

    @ApiModelProperty(value = "流水号",required = true)
    @Size(max=32, message = "交易流水号必须小于32位")
    @Pattern(regexp = RegexConstant.ALL_CHARSET_AND_NUMBER, message = "流水号只能是英文字母和数字组成且不可为空")
    @NotEmpty(message = "流水号不可空")
    private String seqNo;

    @ApiModelProperty(value = "放款审批案件号",required = true)
    @Size(max=32, message = "放款审批案件号不能超过32位")
    @NotEmpty(message = "放款审批案件号不可空")
    private String caseId;

    @ApiModelProperty(value = "借款金额",required = false)
    private BigDecimal loanAmount;

    @ApiModelProperty(value = "合同号",required = false)
    @Size(max=32, message = "合同号不能超过32位")
    private String contractNumber;

    @ApiModelProperty(value = "还款方式",required = true)
    @Size(max=2, message = "还款方式不能超过2位")
    @NotEmpty(message = "还款方式不可空")
    private String amortMethod;

    @ApiModelProperty(value = "贷款用途",required = true)
    @Size(max=4, message = "贷款用途不能超过4位")
    @NotEmpty(message = "贷款用途不可空")
    private String loanUse;

    @ApiModelProperty(value = "期数",required = false)
    private Integer tenor;

    @ApiModelProperty(value = "商户id",required = false)
    @Size(max=32, message = "商户id不能超过32位")
    private String merchantId;

    @ApiModelProperty(value = "贷款类型",required = false)
    @Size(max=1, message = "贷款类型不能超过1位")
    private String productType;

    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public String getSeqNo() {
        return seqNo;
    }

    public void setSeqNo(String seqNo) {
        this.seqNo = seqNo;
    }

    public String getCaseId() {
        return caseId;
    }

    public void setCaseId(String caseId) {
        this.caseId = caseId;
    }

    public BigDecimal getLoanAmount() {
        return loanAmount;
    }

    public void setLoanAmount(BigDecimal loanAmount) {
        this.loanAmount = loanAmount;
    }

    public String getContractNumber() {
        return contractNumber;
    }

    public void setContractNumber(String contractNumber) {
        this.contractNumber = contractNumber;
    }

    public String getAmortMethod() {
        return amortMethod;
    }

    public void setAmortMethod(String amortMethod) {
        this.amortMethod = amortMethod;
    }

    public String getLoanUse() {
        return loanUse;
    }

    public void setLoanUse(String loanUse) {
        this.loanUse = loanUse;
    }

    public Integer getTenor() {
        return tenor;
    }

    public void setTenor(Integer tenor) {
        this.tenor = tenor;
    }

    public String getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(String merchantId) {
        this.merchantId = merchantId;
    }

    public String getProductType() {
        return productType;
    }

    public void setProductType(String productType) {
        this.productType = productType;
    }
}
